package com.study.bean的属性注入;

/**
 * @author chenhs
 * @date 2019/9/7
 */
public class User {
	private  Pen pen;
	/*姓名*/
	private String name;
	/*年龄*/
	private Integer age;
	/*性别*/
	private  String sex;
	
	public  User(String anme ,String sex){
		this.name=anme;
		this.sex=sex;
	}
	 public  User(String name,Integer age){
		this.name=name;
		this.age=age;
	}
	
	public  User(Pen pen){
		this.pen=pen;
	}
	public  void show(){
		System.out.println("你好，我是 ："+name+",我的性别："+sex+"我今年"+age);
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public void setAge(Integer age) {
		this.age = age;
	}
	
	public void setSex(String sex) {
		this.sex = sex;
	}
	
	public void setPen(Pen pen) {
		this.pen = pen;
	}
	
	public Pen getPen() {
		return pen;
	}
}
